package ar.com.webmaster;

import org.zkoss.zk.ui.*;
import org.zkoss.zk.ui.event.*;
import org.zkoss.zul.*;

public class TestRichlet extends GenericRichlet {
	// Richlet//
	public void service(Page page) {
		page.setTitle("Richlet Test");

		final Window w = new Window("Richlet Test", "normal", false);

		Hbox box = new Hbox();
		final Vbox vox = new Vbox();
		
		Label label = new Label("nose");
		vox.appendChild(label);
		
		
		final Label etiqueta = new Label("Ingrese texto");
		final Textbox textbox = new Textbox();
		final Textbox textbox1 = new Textbox();
		Button boton = new Button();
		boton.setLabel("touch me!");
		boton.addEventListener(Events.ON_CLICK, new EventListener<Event>() {

			@Override
			public void onEvent(Event arg0) throws Exception {
				
				new Richlet2(vox);
			}
		});
		
		box.appendChild(etiqueta);
		box.appendChild(textbox);
		box.appendChild(boton);
		box.appendChild(textbox1);
		
		w.appendChild(box);
		w.appendChild(vox);

		w.setPage(page);
	}

	@Override
	public void init(RichletConfig config) {
		super.init(config);
		// initialize resources
	}

	@Override
	public void destroy() {
		super.destroy();
		// destroy resources
	}
}
